home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
whatsm
/
numform.frm
< prev
next >
Wrap
Text File
|
1996-06-12
|
12KB
|
524 lines
VERSION 2.00
Begin Form Form1
BackColor = &H00FFFFFF&
Caption = "What's My Number?"
ClientHeight = 4575
ClientLeft = 1245
ClientTop = 1755
ClientWidth = 7695
Height = 5265
Icon = NUMFORM.FRX:0000
Left = 1185
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4575
ScaleWidth = 7695
Top = 1125
Width = 7815
Begin CommandButton Command1
Caption = "Give up"
Height = 735
Left = 1440
TabIndex = 8
Top = 3600
Width = 1455
End
Begin CommandButton OK
Caption = "OK"
Default = -1 'True
Height = 735
Left = 5520
TabIndex = 2
Top = 1080
Width = 1575
End
Begin TextBox Text1
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Times New Roman"
FontSize = 24
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 735
Left = 3240
TabIndex = 0
Top = 1080
Width = 1935
End
Begin Label Label5
BackColor = &H00FFFFFF&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Times New Roman"
FontSize = 24
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
Left = 5160
TabIndex = 5
Top = 3720
Width = 615
End
Begin Label Label4
BackColor = &H00FFFFFF&
Caption = "Turns:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Times New Roman"
FontSize = 24
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
Left = 3600
TabIndex = 4
Top = 3720
Width = 1455
End
Begin Label Label3
Alignment = 2 'Center
BackColor = &H00FFFFFF&
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Times New Roman"
FontSize = 24
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 615
Left = 840
TabIndex = 6
Top = 2160
Width = 5775
End
Begin Label Label1
BackColor = &H00FFFFFF&
Caption = "Enter your guess in the box to the right, then press Enter."
Height = 495
Left = 480
TabIndex = 1
Top = 1200
Width = 2535
End
Begin Label Label6
BackColor = &H00FFFFFF&
Caption = "1000"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 12
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 375
Left = 5880
TabIndex = 7
Top = 480
Width = 1095
End
Begin Label Label2
BackColor = &H00FFFFFF&
Caption = "Please choose a number between 1 and "
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 12
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 375
Left = 960
TabIndex = 3
Top = 480
Width = 4935
End
Begin Menu file
Caption = "&Game"
Begin Menu new
Caption = "&New"
Shortcut = {F2}
End
Begin Menu ex
Caption = "E&xit"
Shortcut = ^X
End
Begin Menu dash
Caption = "-"
Index = 2
End
Begin Menu abt
Caption = "&About WM#?..."
End
End
Begin Menu options
Caption = "&Options"
Begin Menu highlow
Caption = "&Higher/Lower"
Checked = -1 'True
End
Begin Menu hotcold
Caption = "Hot/&Cold"
End
Begin Menu dasher
Caption = "-"
Index = 1
End
Begin Menu boundaries
Caption = "&Set Boundaries..."
End
Begin Menu colorscheme
Caption = "&Background Color"
Begin Menu green
Caption = "&Green"
End
Begin Menu blue
Caption = "&Blue"
End
Begin Menu red
Caption = "&Red"
End
Begin Menu yellow
Caption = "&Yellow"
End
Begin Menu purple
Caption = "&Purple"
End
Begin Menu bluegray
Caption = "Bl&ue-Gray"
End
Begin Menu gray
Caption = "Gr&ay"
End
Begin Menu white
Caption = "&White"
Checked = -1 'True
End
End
End
Begin Menu help
Caption = "&Help"
End
End
Sub about_Click ()
Load about
about.Show
End Sub
Sub abt_Click ()
Load about
about.Show
End Sub
Sub blue_Click ()
green.checked = 0
blue.checked = -1
red.checked = 0
yellow.checked = 0
purple.checked = 0
bluegray.checked = 0
gray.checked = 0
white.checked = 0
h = &HFFFF00
form1.backColor = h
label1.backColor = h
label2.backColor = h
label3.backColor = h
label4.backColor = h
label5.backColor = h
label6.backColor = h
End Sub
Sub bluegray_Click ()
green.checked = 0
blue.checked = 0
red.checked = 0
yellow.checked = 0
purple.checked = 0
bluegray.checked = -1
gray.checked = 0
white.checked = 0
h = &H808000
form1.backColor = h
label1.backColor = h
label2.backColor = h
label3.backColor = h
label4.backColor = h
label5.backColor = h
label6.backColor = h
End Sub
Sub boundaries_Click ()
message$ = "Pick a number between 1 and:"
response$ = InputBox$(message$, "What's My Number?", label6.caption)
If response$ = "" Then response$ = label6.caption
t = Val(response$)
label6.caption = Str$(t)
Randomize
x = Int(t * Rnd + 1)
label5.caption = ""
label3.caption = ""
text1.enabled = -1
OK.enabled = -1
turns = 0
command1.enabled = -1
End Sub
Sub Command1_Click ()
command1.enabled = 0
text1.enabled = 0
OK.enabled = 0
label3.caption = ""
w$ = "The number was " + Str$(x)
MsgBox w$, 64, "Chicken!!!"
End Sub
Sub ex_Click ()
label4.caption = ""
label5.caption = ""
label3.caption = ""
Unload form1
End Sub
Sub Form_Click ()
If about.visible = -1 Then
Beep
about.Show
End If
End Sub
Sub Form_Load ()
t = 1000
Randomize
x = Int(t * Rnd + 1)
End Sub
Sub gray_Click ()
green.checked = 0
blue.checked = 0
red.checked = 0
yellow.checked = 0
purple.checked = 0
bluegray.checked = 0
gray.checked = -1
white.checked = 0
h = &HC0C0C0
form1.backColor = h
label1.backColor = h
label2.backColor = h
label3.backColor = h
label4.backColor = h
label5.backColor = h
label6.backColor = h
End Sub
Sub green_Click ()
green.checked = -1
blue.checked = 0
red.checked = 0
yellow.check